<?php
/**
 * 初始化smarty
 */
include_once S_ROOT.'smarty/Smarty.class.php';

global $smarty;

$smarty = new Smarty();

$smarty->template_dir = S_ROOT.'tpl/';
$smarty->compile_dir = S_ROOT.'tpl_c/';
$smarty->compile_check = true;
$smarty->force_compile = false;

$smarty->debugging = false;

$smarty->caching = 0;
$smarty->cache_lifetime = 3600;
$smarty->cache_dir = S_ROOT.'cache';

$smarty->left_delimiter="<{";
$smarty->right_delimiter="}>";

define('TPL_ROOT', $smarty->template_dir);

$smarty->assign('appRoot', S_ROOT);
$smarty->assign('smartyRoot', $smarty->template_dir);
?>